const http = uni.$u.http

// 购物车列表
export const getShopCarList = (data, config = { custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/cart/getShoppingCartList', data, config)
// 加入购物车
export const addShopCar = (data, config = { custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/cart/addShoppingCartReturnSku', data, config)
// 更改购物车数量
export const changeCarNum = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => {
  return http.post('/api/pc/cart/updateCartCount', data, config)
}
// 更改购物车选中
export const changeSelect = (data, config = { custom: { type: 'ycMainUrl' }}) => {
  return http.post('/api/pc/cart/joinPromotion', data, config)
}
// 购物车删除
export const deleteCar = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => {
  return http.post('/api/pc/cart/deleteShoppingCartList', data, config)
}
// 批量收藏
export const CollectionShops = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => {
  return http.post('/api/pc/membership/batchAddMemberCollect', data, config)
}
//收藏 删除
export const deleteMemberCollect = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/membership/deleteMemberCollect ', data, config)
//常购 删除
export const updatePurchase = (data, config = { header: { 'Content-Type': 'application/x-www-form-urlencoded' }, custom: { type: 'ycMainUrl' }}) => http.post('/api/pc/order/regularpurchase/updatePurchase', data, config)

